
for number in range(1,99999999):
    sum = 0
    for divisor in range(1, int(number/2) + 1):
        if number % divisor == 0:
            sum = sum + divisor

    if sum == number:
        print(number)







